package com.sntk.registermanager.staff.infrastructure.commit;


import com.alibaba.fastjson.JSONObject;
import com.sntk.registermanager.common.infrastructure.resp.OperatorInfo;
import com.sntk.registermanager.common.infrastructure.resp.ResponseData;
import com.sntk.registermanager.staff.infrastructure.commit.impl.UserCommitHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * @author liuyunxia
 */
@Component
@FeignClient(name= "organ-autho-manager", fallback = UserCommitHystrix.class)
public interface UserCommit {

    @PostMapping(value = "/sinohis/osm/interior/sys/user")
    ResponseData addUser(JSONObject jsonObject, @RequestHeader(name = "operator")  String operatorInfo);


    @GetMapping(value = "/sinohis/osm/interior/sys/user")
    ResponseData<String> searchUser(@RequestParam("uname") String uname);

}
